package com.sqkj.controller;

import com.sqkj.util.CommonUtil;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.junit.jupiter.api.Test;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;

public class test {

    @Test
    public void test2() {
        JSONObject jsonObject = CommonUtil.httpsRequest("http://api.douban.com/v2/movie/top250", "GET", "");

        Object subjects = jsonObject.get("subjects");
        JSONArray jsonObject1 = JSONArray.fromObject(subjects);
        for (Object js:jsonObject1) {
                JSONObject object = JSONObject.fromObject(js);
                System.out.println(object.get("title"));

        }
    }
    @Test
    public void test3() {
         int i = 0;
        out:if (i == 1) {
          break out;

        } else {
            System.out.println("啊啊啊啊啊啊");
        }
        System.out.println("ggggg");
    }

}
